using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class ACCTCLASSMap : EntityTypeConfiguration<ACCTCLASS>
    {
        public ACCTCLASSMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.ARBNAME)
                .HasMaxLength(50);

            this.Property(t => t.ENGNAME)
                .HasMaxLength(50);

            this.Property(t => t.ACRONYM)
                .HasMaxLength(3);

            // Table & Column Mappings
            this.ToTable("ACCTCLASS");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.ARBNAME).HasColumnName("ARBNAME");
            this.Property(t => t.ENGNAME).HasColumnName("ENGNAME");
            this.Property(t => t.ACRONYM).HasColumnName("ACRONYM");
        }
    }
}
